// component/NavigationBar.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    backgroundColor: {
      type: String,
      value: '#ffffff'
    }, //背景颜色
    titleColor: {
      type: String,
      value: '#000'
    }, //文字颜色
    isNeedBackBotton: {
      type: Boolean,
      value: true
    }, //是否需要返回按钮
    title: {
      type: String,
      value: '导航'
    }, //标题
    theme: {
      type: String,
      value: 'black'
    },
    cover: {
      type: Boolean,
      value: false
    },
    center: {
      type: Boolean,
      value: true
    },
    logo: {
      type: String,
      value: ''
    },
    regist: {
      type: Boolean,
      value: false
    },
    needShow: {
      type: Boolean,
      value: true
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    statusBarHeight: app.globalData.systemInfo['statusBarHeight'],
  },
  //用于自定义字体样式
  externalClasses: ['customer-title'],

  /**
   * 组件的方法列表
   */
  methods: {
    backBottonPressed: function (e) {
      this.triggerEvent('popMethod', e, {});
    }
  }
})